From a5d9a4f4ae4884eafe19674371d591fdffcc5234 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 16 Dec 2010 15:38:57 +0000 Subject: [PATCH] vtd: Require unmap_vtd_domain_page() on a couple of early exit paths. From: Jan Beulich Signed-off-by: Keir Fraser --- xen/drivers/passthrough/vtd/iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 0f28aa207f..3bf4febf96 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1336,6 +1336,7 @@ int domain_context_mapping_one( if ( context_set_domain_id(context, domain, iommu) ) { spin_unlock(&iommu->lock); + unmap_vtd_domain_page(context_entries); return -EFAULT; } @@ -1684,6 +1685,7 @@ static int intel_iommu_map_page( if ( old.val == new.val ) { spin_unlock(&hd->mapping_lock); + unmap_vtd_domain_page(page); return 0; } *pte = new; -- 2.30.2